<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MyStack.Models.StoriesView>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Explore
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Explore</h2>

    <fieldset>

        <ul>
        <% foreach (var history in Model.Histories)
           {%>
           <%if (history.ActionType == 0)
             {%>
           <li>
            <%= Html.ActionLink(Model.Users[history.UserId].Name, "Current", "Stack", new {id=history.UserId}, new object()) %>
            wrote and pushed
            <%= Html.ActionLink(Model.Stories[history.StoryId].Title, "Pop", "Stack", new {storyid=history.StoryId, stackid=history.StackId}, new object())%>
            </li>
           <%} %>
           <%if (history.ActionType == 1) %>
           <%{ %>
           <li>
            <%= Html.ActionLink(Model.Users[history.UserId].Name, "Current", "Stack", new { id = history.UserId })%>
            pushed
            <%= Html.ActionLink(Model.Stories[history.StoryId].Title, "Pop", "Stack", new { storyid = history.StoryId, stackid = history.StackId })%>
            </li>
           <%} %>
        <%} %>

        </ul>
    </fieldset>


</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
